GXFetchTaggedData
QuickDraw GX, an application, a printing extension, or a printer driver can send theGXFetchTaggedData
message to retrieve or modify data from a resource. You can override theGXFetchTaggedData
message to modify data from your resources at run time. UseGXFetchTaggedData
to retrieve and modify resource data that you access by resource type and ID. Your override of theGXFetchTaggedData
message must match the following formal declaration:
OSErr MyFetchTaggedData (ResType aResType, short id, Handle *aHandle, Signature owner);
aResType
- On input, the resource type in which you are interested.
id
- The resource ID.
aHandle
- On return, a pointer to a handle that contains the resource data.
owner
- The owner of the requested data.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX or any message handler can send this message to obtain resource information from a printer driver. You can send this message to yourself to obtain data from a particular resource.You specify the resource type and ID of the resource to retrieve in the
aResType
andid
parameters, respectively. The resource handle is returned with a handle value in theaHandle
parameter. Theowner
parameter defines the owner type of the resource.The default implementation of this message accesses the resource that belongs to the driver by calling the
GetResource
function and then calling theDetachResource
function. Override this message if you wish to change resource data that is being read from a printing extension, a printer driver, or the desktop printer.If you are not the owner of the data (that is, if the owner ID is not your creator type),
you need to forward this message. If the owner ID is'drvr'
, the message is intended for the currently active driver. If you are the owner, you need to create a handle for the tagged data and fill it out. If you use theGetResource
function to get the handle, be sure to call theDetachResource
function to change the handle into a non-Resource Manager handle.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. SEE ALSO
TheGetResource
andDetachResource
functions are described in the chapter "Resource Manager" in Inside Macintosh: More Macintosh Toolbox.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help